package com.crealth.mapper;


import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.crealth.model.ClienteleInfoModel;

public abstract interface ClienteleInfoMapper {
	
    public abstract List<ClienteleInfoModel> selectClienteleInfo(
    		@Param("begID")Long begID,
    		@Param("userID")int userID,
    		@Param("cdrTbName")String cdrTbName,
    		@Param("preMonthTbName")String preMonthTbName,
    		@Param("commitDataIDs")String commitDataIDs);
    
    public abstract List<ClienteleInfoModel> selectClienteleInfoSelf(
    		@Param("commitDataIDs")String commitDataIDs);
    
    public abstract List<ClienteleInfoModel> selectClienteleInfoByCreateUser(
    		@Param("userID")int userID);
    
    public abstract Integer selectClienteleCntByCondition(
    		@Param("strCondition")String strCondition);
    
    public abstract List<ClienteleInfoModel> selectClienteleInfoByCondition(
    		@Param("strCondition")String strCondition);
    
    public abstract void updateDispatchedUserID(@Param("setUserID")Integer setUserID, 
    		@Param("inIDs")String inIDs);
    
    public abstract List<ClienteleInfoModel> selectClienteleInfoByMobi(
    		@Param("searchMobi")String searchMobi);
    
    public abstract List<ClienteleInfoModel> selectClienteleInfoFromAlbbByMobi(
    		@Param("searchMobi")String searchMobi);
    
    public abstract List<ClienteleInfoModel> selectClienteleInfoByName(
    		@Param("searchName")String searchName);

    public abstract Integer insertClienteleInfo(
    		@Param("strMobi")String strMobi,
    		@Param("strNoti")String strNoti,
    		@Param("strName")String strName,
    		@Param("createrID")Integer createrID);
    
    public abstract Integer insertClienteleObj(
    		ClienteleInfoModel cliModel);    
    
    public abstract void updateCallClientele(
    		@Param("callMobi")String callMobi, 
    		@Param("setUserID")int setUserID);
    
    public abstract Integer selectMaxClientID();
    
    public abstract void resetTodayDispatchNum();
    
    //  获得 所以 禁止呼叫的电话号码
    public abstract List<String> selectAllForbidCallee();
    
    //  标记 自由客户  已经拨打
    public abstract Integer updateSelfAlreadyCall(
    		@Param("userID")int userID, 
    		@Param("callMobi")String callMobi,
    		@Param("setAlreadyCall")int setAlreadyCall);
    
    public abstract Integer updateSelfAlreadyCallList(
    		@Param("userID")int userID, 
    		@Param("callMobi")String callMobils,
    		@Param("setAlreadyCall")int setAlreadyCall);
    
    
    public abstract List<ClienteleInfoModel> selectClienteleName(
    		@Param("id")int id);    
    public abstract Integer updateNameByID(
    		@Param("id")int id,
    		@Param("setName")String setName);
    public abstract List<ClienteleInfoModel> selectClienteleHous(
    		@Param("id")int id);    
    public abstract Integer updateHousByID(
    		@Param("id")int id,
    		@Param("setHous")String setHous);
    
    public abstract Integer deleteSelfClient(
    		@Param("userID")int userID);
    
    public abstract void deleteAllClient();
    
    
    public abstract Integer insertGroupCallMobi(
    		@Param("sqlValues")String sqlValues);
    
    public abstract Integer deleteAllGroupCallMobi(@Param("companyID")int companyID);
    
    public abstract List<String> selectNotCallMobiPhone(@Param("companyID")int companyID);
    
    public abstract Integer updateDispenseNoCallByUserID(
    		@Param("userID")int userID);
    
    public abstract Integer updateCdridByMobiPhone(
    		@Param("mobiPhone")String mobiPhone,
    		@Param("setCdrid")long setCdrid);
    
    public abstract Integer updateGroupCallDispenseUserid(
    		@Param("strMobiPhonels")String strMobiPhonels,
    		@Param("setUserID")int setUserID);
    
    //  将没有呼叫的号码  重置
    public abstract Integer updateClearNotCallFromGroupCallMobi();
    
    
    
    public abstract List<ClienteleInfoModel> selectAllClienteleMobi(
    		@Param("smallID")int smallID);
    public abstract Integer updateClienteMobi(
    		@Param("id")int id,
    		@Param("setMobi")String setMobi);
    
    public abstract List<String> selectAllGroupCallMobiPhone();
    public abstract Integer updateGroupCallMobi(
    		@Param("mobi")String mobi,
    		@Param("setMobi")String setMobi);
    
    public abstract List<ClienteleInfoModel> selectAllClienteleMobiFromAlbb(
    		@Param("smallID")int smallID);
    public abstract Integer updateClienteAlbbMobi(
    		@Param("id")int id,
    		@Param("setMobi")String setMobi);
    
    public abstract Integer updateAccCallNumByPhonenum(
    		@Param("mobiPhone")String mobiPhone);
    
    public abstract Integer selectGroupCallMobiSumNum();    
    public abstract Integer selectGroupCallMobiNotCallNum();
    //  呼通的数量
    public abstract Integer selectGroupCallMobiHold();
    //  已拨打数量
    public abstract Integer selectGroupCallMobiAlreadyCallNum();
    //  未分配的数量
    public abstract Integer selectGroupCallMobiNotDispense();
    
    public abstract Integer selectGroupCallMobiSumNum2(@Param("companyID")int companyID);    
    public abstract Integer selectGroupCallMobiNotCallNum2(@Param("companyID")int companyID);
    //  呼通的数量
    public abstract Integer selectGroupCallMobiHold2(@Param("companyID")int companyID);
    //  已拨打数量
    public abstract Integer selectGroupCallMobiAlreadyCallNum2(@Param("companyID")int companyID);
    //  未分配的数量
    public abstract Integer selectGroupCallMobiNotDispense2(@Param("companyID")int companyID);
    
    public abstract Integer selectUserClienteleSumNum(
    		@Param("userID")int userID);
    public abstract Integer selectUserClienteleNotCallNum(
    		@Param("userID")int userID);
    
}
